package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysTenantApplicationMapper;
import com.ruoyi.system.domain.SysTenantApplication;
import com.ruoyi.system.service.ISysTenantApplicationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 租户子系统中间Service业务层处理
 * 
 * @author kuaidou
 * @date 2021-08-23
 */
@Service
public class SysTenantApplicationServiceImpl implements ISysTenantApplicationService 
{
    @Autowired
    private SysTenantApplicationMapper sysTenantApplicationMapper;

    /**
     * 查询租户子系统中间
     * 
     * @param tenantCode 租户子系统中间主键
     * @return 租户子系统中间
     */
    @Override
    public List<SysTenantApplication> selectSysTenantApplicationByTenantCode(String tenantCode)
    {
        return sysTenantApplicationMapper.selectSysTenantApplicationByTenantCode(tenantCode);
    }

    /**
     * 查询租户子系统中间列表
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 租户子系统中间
     */
    @Override
    public List<SysTenantApplication> selectSysTenantApplicationList(SysTenantApplication sysTenantApplication)
    {
        return sysTenantApplicationMapper.selectSysTenantApplicationList(sysTenantApplication);
    }

    /**
     * 新增租户子系统中间
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 结果
     */
    @Override
    public int insertSysTenantApplication(SysTenantApplication sysTenantApplication)
    {
        return sysTenantApplicationMapper.insertSysTenantApplication(sysTenantApplication);
    }

    /**
     * 修改租户子系统中间
     * 
     * @param sysTenantApplication 租户子系统中间
     * @return 结果
     */
    @Override
    public int updateSysTenantApplication(SysTenantApplication sysTenantApplication)
    {
        return sysTenantApplicationMapper.updateSysTenantApplication(sysTenantApplication);
    }

    /**
     * 批量删除租户子系统中间
     * 
     * @param tenantCodes 需要删除的租户子系统中间主键
     * @return 结果
     */
    @Override
    public int deleteSysTenantApplicationByTenantCodes(String tenantCodes)
    {
        return sysTenantApplicationMapper.deleteSysTenantApplicationByTenantCodes(Convert.toStrArray(tenantCodes));
    }

    /**
     * 删除租户子系统中间信息
     * 
     * @param tenantCode 租户子系统中间主键
     * @return 结果
     */
    @Override
    public int deleteSysTenantApplicationByTenantCode(String tenantCode)
    {
        return sysTenantApplicationMapper.deleteSysTenantApplicationByTenantCode(tenantCode);
    }
}
